package com.sc.nft.dto;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * 共振服务中心系数考核配置
 *
 * @Author：LiGen
 * @Package：com.sc.nft.dto
 * @Project：sc_metago
 * @name：ResonanceServiceCenterCoefficientConfDTO
 * @Date：2024/7/14 14:28
 * @Filename：ResonanceServiceCenterCoefficientConfDTO
 */
@Data
public class ResonanceServiceCenterCoefficientConfDTO {

    @ApiModelProperty(value = "范围最小值")
    @NotNull(message = "范围最小值不能为空")
    private Integer minNum;

    @ApiModelProperty(value = "范围最大值")
    private Integer maxNum;

    @ApiModelProperty(value = "系数")
    private BigDecimal coefficient;

    public BigDecimal getCoefficient() {
        return coefficient.setScale(4, BigDecimal.ROUND_DOWN);
    }

}
